﻿using RoadQualityEvaluatorData.Domain.Entities;
using RoadQualityEvaluatorData.DomainServices.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RoadQualityEvaluatorData.DomainServices.Repositories
{
    public class RoleRepository : Repository<Role>
    {

        public RoleRepository() : base()
        {
        }

        public RoleRepository(UnitOfWork uo)
            : base(uo)
        {
        }

        public Role GetRoleByName(string name)
        {
            return this.GetAll().Where(r => r.RoleName.Equals(name)).FirstOrDefault();
        }

    }
}
